import { get, post } from './http.js';
let userlogin = params => post('/userlogin', params);

let menulist = () => get('/menulist', { istree: 1 });
let menuaddedit = (url, params) => post(url, params);
// let menuedit = params => post('/menuedit', params);
let menuinfo = params => get('/menuinfo', params);
let menudelete = params => post('/menudelete', params);

let rolelist = () => get('/rolelist');
let roleaddedit = (url, params) => post(url, params);
// let roleedit = params => post('/roleedit', params);
let roledelete = params => post('/roledelete', params);
let roleinfo = params => get('/roleinfo', params);

let userlist = params => get('/userlist', params);
let usercount = () => get('/usercount');
let useraddedit = (url, params) => post(url, params);
let userinfo = params => get('/userinfo', params);
// let useredit = params => post('/useredit', params);
let userdelete = params => post('/userdelete', params);

let catelist = () => get('/catelist', { istree: 1 });
let cateaddedit = (url, params) => post(url, params, true);
let catedelete = params => post('/catedelete', params);
let cateinfo = params => get('/cateinfo', params);
// let cateedit = (params, type) => post('/cateedit', params, true);

let specslist = params => get('/specslist', params);
let specscount = () => get('/specscount');
let specsaddedit = (url, params) => post(url, params);
let specsdelete = params => post('/specsdelete', params);
let specsinfo = params => get('/specsinfo', params);
// let specsedit = params => post('/specsedit', params);

let goodslist = params => get('/goodslist', params);
let goodscount = () => get('/goodscount');
let goodsaddedit = (url, params) => post(url, params, true);
let goodsdelete = params => post('/goodsdelete', params);
let goodsinfo = params => get('/goodsinfo', params);
// let goodsedit = params => post('/goodsedit', params, true);

let memberlist = params => get('/memberlist', params);
let memberinfo = params => get('/memberinfo', params);
let membercount = () => get('/membercount');
let memberedit = params => post('/memberedit', params);

let bannerlist = params => get('/bannerlist', params);
let bannercount = () => get('/bannercount');
let bannerdelete = params => post('/bannerdelete', params);
// let banneredit = params => post('/banneredit', params, true);
let bannerinfo = params => get('/bannerinfo', params);
let banneraddedit = (url, params) => post(url, params, true);

let secklist = () => get('/secklist');
let seckaddedit = (url, params) => post(url, params);
let seckinfo = params => get('/seckinfo', params);
// let seckedit = params => post('/seckedit', params);
let seckdelete = params => post('/seckdelete', params);

export {
    userlogin,
    menulist,
    menuaddedit,
    menuinfo,
    menudelete,
    // menuedit,

    rolelist,
    roleaddedit,
    roledelete,
    roleinfo,
    // roleedit,

    userlist,
    usercount,
    useraddedit,
    userinfo,
    // useredit,
    userdelete,

    catelist,
    cateaddedit,
    catedelete,
    cateinfo,
    // cateedit,

    specslist,
    specscount,
    specsaddedit,
    specsdelete,
    specsinfo,
    // specsedit,

    goodslist,
    goodscount,
    goodsaddedit,
    goodsdelete,
    goodsinfo,
    // goodsedit,

    memberlist,
    memberinfo,
    membercount,
    memberedit,

    bannerlist,
    bannercount,
    bannerdelete,
    banneraddedit,
    bannerinfo,
    // banneradd,

    secklist,
    seckaddedit,
    seckinfo,
    // seckedit,
    seckdelete
}